package com.example.ranl_offershow.Controller;

import com.example.ranl_offershow.Service.TestService;
import com.example.ranl_offershow.Utils.Result;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;

@Slf4j
@RestController
@RequestMapping("/test")
public class FileController {

    @Autowired
    private TestService testService;

    @PostMapping("/import")
    public Result importExcel(@RequestBody MultipartFile multipartFile){
        testService.importExcel(multipartFile);
        return Result.success("ok");
    }
}
